package edu.zut.hb.software.student.service.impl;

import java.util.ArrayList;
import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.hb.software.base.service.impl.GenericManagerImpl;

import edu.zut.hb.software.student.dao.StudentDao;
import edu.zut.hb.software.student.domain.Student;
import edu.zut.hb.software.student.service.StudentService;


@Service
@Transactional
public class StudentServiceImpl extends GenericManagerImpl<Student,Long> implements StudentService {

    StudentDao studentDao;

    @Autowired
    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
        this.dao=this.studentDao;
    }

    @Override
    public List list() {
        List list = new ArrayList();
        for (int i = 0; i < 10; i++) {
            Student student = new Student();
            student.setName("第"+i+"诊室");
            student.setNum(i);
            student.setStatus(true);
            list.add(student);
        }
        return list;
    }
}
